Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change condition of PHC to reduce amount of produced logs #3046

Merged
merged 1 commit into from
Apr 26, 2024

Conversation

RomanZavodskikh
Copy link
Member

Logging every request produces too many log lines.
However, we can still keep the logs of stats updater https://github.com/zalando/skipper/blob/v0.21.65/routing/endpointregistry.go#L172 because their amount does not depend on requests count.

@RomanZavodskikh RomanZavodskikh added the minor no risk changes, for example new filters label Apr 26, 2024
@RomanZavodskikh
Copy link
Member Author

👍

@RomanZavodskikh RomanZavodskikh changed the title Change log level of PHC logs to reduce amount of produced logs Change condition of PHC logging to reduce amount of produced logs Apr 26, 2024
proxy/healthy_endpoints.go Outdated Show resolved Hide resolved
It is hardcoded to 5% now, but we plan to make it configurable.

Signed-off-by: Roman Zavodskikh <roman.zavodskikh@zalando.de>
@szuecs
Copy link
Member

szuecs commented Apr 26, 2024

👍

1 similar comment
@RomanZavodskikh
Copy link
Member Author

👍

@RomanZavodskikh RomanZavodskikh changed the title Change condition of PHC logging to reduce amount of produced logs Change condition of PHC to reduce amount of produced logs Apr 26, 2024
@RomanZavodskikh RomanZavodskikh merged commit f6bf033 into master Apr 26, 2024
14 checks passed
@RomanZavodskikh RomanZavodskikh deleted the reducePHCLogsLevel branch April 26, 2024 17:00
@@ -22,7 +22,7 @@ func (h *healthyEndpoints) filterHealthyEndpoints(ctx *context, endpoints []rout
filtered := make([]routing.LBEndpoint, 0, len(endpoints))
for _, e := range endpoints {
dropProbability := e.Metrics.HealthCheckDropProbability()
if p < dropProbability {
if dropProbability > 0.05 && p < dropProbability {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, this does not look right as it not only influences logging but a logic of dropping the endpoint.

We can enhance logging to log once a second/minute and also keep drop counter in the e.Metrics for logging but maybe we should just remove logs and rely on the passive-health-check.endpoints.dropped.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And when probability goes up this will flood logs anyway.

Copy link
Member

@AlexanderYastrebov AlexanderYastrebov Apr 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The min probability cutoff (if we really want it) should be implemented in updateStats()

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As long as we have no metrics that are good enough we let the logs.
The idea was that we cut the min. There was a lot of logs that were way too close to 0 to make sense. If you have all endpoints having a low error rate you just cycle through all of them, likely something we also want to address.

JanardhanSharma pushed a commit to JanardhanSharma/skipper that referenced this pull request Jul 19, 2024
It is hardcoded to 5% now, but we plan to make it configurable.

Signed-off-by: Roman Zavodskikh <roman.zavodskikh@zalando.de>
Co-authored-by: Roman Zavodskikh <roman.zavodskikh@zalando.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor no risk changes, for example new filters
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants